package com.atguigu.springcloud.service;

import com.atguigu.springcloud.entities.CommonResult;
import com.atguigu.springcloud.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author XuZhuHong
 * @CreateTime 2021/11/4 17:28
 */
@Service
@FeignClient(value = "cloud-payment-service") //这里面填写服务名  需要
public interface PaymentFeignService {

    @GetMapping(value = "/payment/get/{id}")
    //这个就是写服务提供者里面的接口调用地址  对应服务提供者的controller
    CommonResult< Payment > getPaymentById(@PathVariable("id") Long id);
}
